package com.hualan.dao.impl;

import com.hualan.dao.CommunityUserDao;
import com.hualan.utils.C3p0Util;


import java.util.Map;

/**
 * 小区用户数量
 */
public class CommunityUserDaoImpl implements CommunityUserDao {

    //根据小区id获取小区用户数量
    @Override
    public Long getCommunityUserCount(Integer communityId) {
        String sql = "select count(*) as count from panghu_wechat_user_community where panghu_community_id = ?";
        Map<String, Object> map = C3p0Util.queryOne(sql, communityId);
        Object count = map.get("count");
        return (Long) count;
    }
}
